/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Interfata;

/**
 * Clasa principala a sablonului de proiectare Chain of Responsability
 * care va transmite responsabilitatea executiei subclaselor
 * @author AlinT
 */
public class Incomplet extends Complet {

    String functie, ics;

    /**
     * Constructor explicit
     * @param fct functia introdusa de utilizator
     * @param x valoarea lui x introdusa de utilizator
     */
    Incomplet(String fct, String x) {
        this.functie = fct;
        this.ics = x;
    }

    /**
     * Functia ce transmite responsabililor(pe rand) tratarea cazului de executie
     */
    public void execute() {
        Lipsa test1 = new LipsaX(null, functie, ics);
        Lipsa test2 = new LipsaFunctie(test1, functie, ics);
        Lipsa test3 = new LipsaFunctieAndX(test2, functie, ics);

        test3.HandleTest();
    }
}
